<template>
	<div class="author-info" v-show="showModal">
		<view class="center-box">
			<view class="top">
				<view class="top-title">
					开发信息
				</view>
				<view class="top-close" @click="closeModal">
					<view class="iconfont icon-close"></view>
				</view>
			</view>
			<view class="list">
				<view class="item" v-for="(item,index) in infoList" :key="index">
					<view class="item-avatar">
						<image :src="item.avatar" alt="">
					</view>
					<view class="item-info">
						<view class="info-name">
							{{item.name}}
						</view>
						<view class="info-desc">
							{{item.desc}}
						</view>
					</view>
				</view>
			</view>
		</view>
	</div>
</template>

<script>
	import iconfont from '../static/iconfont.png'
	import authorAvatar from '../static/authorAvatar.jpg'
	export default {
		name: 'author-info',
		data() {
			return {
				showModal: false,
				infoList: [{
					avatar: authorAvatar,
					name: 'CYQ',
					desc: '- -开发者'
				}, {
					avatar: iconfont,
					name: 'iconfont',
					desc: '- -图标来源'
				}]
			}
		},
		methods: {
			closeModal() {
				this.showModal = false
			}
		}
	}
</script>

<style scoped lang='scss'>
	.author-info {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		background: rgba(0, 0, 0, 0.5);
		z-index: 9999;

		.center-box {
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
			width: 75%;
			padding: 32rpx;
			border-radius: 20rpx;
			opacity: 1;
			background: rgba(255, 255, 255, 1);
			-webkit-animation: zoom_move_4 1s;

			.top {
				display: flex;
				justify-content: space-between;

				.top-title {
					font-size: 36rpx;
				}

				.top-close {
					font-size: 36rpx;
				}
			}

			.list {
				margin-top: 30rpx;

				.item {
					display: flex;
					margin-top: 10rpx;

					.item-avatar {
						width: 80rpx;
						height: 80rpx;

						image {
							width: 100%;
							height: 100%;
							border-radius: 50%;
						}
					}

					.item-info {
						margin-left: 30rpx;
					}
				}
			}

		}
	}

	@-webkit-keyframes zoom_move_4 {
		0% {
			opacity: 0;
		}

		60% {
			opacity: 1;
		}
	}
</style>
